<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul id="list"></ul>
    <script>
      const ul = document.getElementById("list");
      while (true) {
        const content = prompt("content?");
        if (content === null) break;
        const li = document.createElement("li");
        li.innerText = content;
        ul.append(li);
      }
    </script>
  </body>
</html>
